const Router = require('koa-router');
const questionController = require('../controllers/questionController');
const authMiddleware = require('../middlewares/authMiddleware');

const router = new Router({ prefix: '/api' });

// 无需认证的路由 - 心理测评题目相关
router.get('/questions', questionController.getAllQuestions);
router.get('/questions/dimension/:dimension', questionController.getQuestionsByDimension);
router.get('/questions/dimensions', questionController.getAllDimensions);
router.get('/questions/single/:id', questionController.getQuestionById);
router.get('/questions/:id', questionController.getQuestionsByAssessmentId);

// 无需认证的路由 - 提交测评答案并获取结果
router.post('/questions/submit', questionController.submitAssessment);

module.exports = router;